package com.abl.app.controller.mt;

import com.abl.core.domain.db.MtRoom;
import com.abl.core.domain.project.SRS;
import com.abl.core.service.mt.MtRoomService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 移动端会议相关接口
 */
@RestController
@RequestMapping("/app/mt/room")
public class MtRoomC {

    @Resource
    private MtRoomService mtRoomService;

    //我开启得会议
    @PostMapping("/myOpen")
    public SRS<MtRoom> myOpen(MtRoom param) {
        MtRoom mtRoom = mtRoomService.myOpenMtRoom(param);
        return SRS.bySuccess(mtRoom);
    }

    //    开启会议
    @PostMapping("/open")
    public SRS<MtRoom> open(MtRoom param) {
        MtRoom mtRoom = mtRoomService.openMtRoom(param);
        return SRS.bySuccess(mtRoom);
    }

    //关闭会议
    @PostMapping("/close")
    public SRS<MtRoom> close(MtRoom param) {
        mtRoomService.closeMtRoom(param);
        return SRS.bySuccess();
    }

    //加入会议,并记录日志
    @PostMapping("/in")
    public SRS<MtRoom> in(MtRoom param) {
        MtRoom mtRoom = mtRoomService.inMtRoom(param);
        return SRS.bySuccess(mtRoom);
    }

    //离开会议,记录日志
    @PostMapping("/out")
    public SRS<MtRoom> out(MtRoom mtRoom) {
        return SRS.bySuccess();
    }

    //获取分享码
    @PostMapping("/qrCode")
    public SRS<MtRoom> qrCode(MtRoom mtRoom) {
        return SRS.bySuccess();
    }

    //修改会议室设置
    @PostMapping("/updateSetting")
    public SRS<MtRoom> updateSetting(MtRoom mtRoom) {
        return SRS.bySuccess();
    }

    //申请上麦
    @PostMapping("/applyUp")
    public SRS<MtRoom> applyUp(MtRoom mtRoom) {
        return SRS.bySuccess();
    }

    //修改用户上麦
    @PostMapping("/updateUserUp")
    public SRS<MtRoom> updateUserUp(MtRoom mtRoom) {
        return SRS.bySuccess();
    }

    //主动开启我的麦克风
    @PostMapping("/openMyMike")
    public SRS<MtRoom> openMyMike(MtRoom mtRoom) {
        return SRS.bySuccess();
    }

    //关主动闭我的麦克风
    @PostMapping("/closeMyMike")
    public SRS<MtRoom> closeMyMike(MtRoom mtRoom) {
        return SRS.bySuccess();
    }

    //当前参会人员分页信息
    @PostMapping("/pageUser")
    public SRS<MtRoom> pageUser(MtRoom mtRoom) {
        return SRS.bySuccess();
    }

    //正在上麦的用户列表
    @PostMapping("/upUserList")
    public SRS<MtRoom> upUserList(MtRoom mtRoom) {
        return SRS.bySuccess();
    }


}
